var express = require("express");
var router = express.Router();
const Result = require("../utils/result");
const scoreService = require("../services/scoreService");

//获取用户积分记录
router.get("/list", async function (req, res) {
  const { size, page, userId } = req.query;
  const { rows, count } = await scoreService.getList(size, page, userId);
  res.json(Result.success({ scores: rows, count }));
});

module.exports = router;
